package com.liumingtai.demo01.upload.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.liumingtai.demo01.modules.email.service.UploadService;
import com.liumingtai.demo01.upload.utils.OssUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.io.InputStream;

@Component
@Service
public class UploadServiceImpl implements UploadService {
    @Autowired
    OssUtils ossUtils;

    @Override
    public String uploadImage(String fileName, InputStream inputStream) {
        return ossUtils.upload(fileName, inputStream);
    }
}
